//
//  OneService.h
//  lTTheOne
//
//  Created by AA on 2024/3/10.
//

#import <Foundation/Foundation.h>
#import "PPNetworkHelper.h"

typedef enum : NSInteger {
    RequstPost,
    Requstget,
    UploadPic,
} RequstType;

typedef void (^RequestSuccessBlock)(id _Nullable responseObject);
typedef void (^RequestFailBlock)(NSError *_Nullable error, NSString *_Nullable errorStr);

NS_ASSUME_NONNULL_BEGIN

@interface OneService : NSObject

// 域名
@property(nonatomic, copy) NSString *domain;

// 接口
@property(nonatomic, copy) NSString *port;

// 请求方式
@property(nonatomic, assign) RequstType requstType;

- (void)requst:(RequestSuccessBlock)success fail:(RequestFailBlock)fail;

// 上传单张或多张图片
- (void)Uploadpicturesimages:(NSArray *)images success:(RequestSuccessBlock)success fail:(RequestFailBlock)fail;

// 请求头
- (void)headers;

// 请求内容
- (NSDictionary *)requstBody;

@end

NS_ASSUME_NONNULL_END
